Skip to content

Conversation

@robsdedude
Copy link

Rationale for this change

Fix the docs. It seems this is a feature and not just happens to work as the code a little below even has an explicit comment:

# None will produce a null buffer pointer

What changes are included in this PR?

Document that Array.from_buffers takes a list[Buffer | None] instead of strictly list[Buffer].

Are these changes tested?

not applicable

Are there any user-facing changes?

Yes, but not in an API sense :)

@github-actions
Copy link

github-actions bot commented Feb 6, 2026

Thanks for opening a pull request!

If this is not a minor PR. Could you open an issue for this pull request on GitHub? https://github.com/apache/arrow/issues/new/choose

Opening GitHub issues ahead of time contributes to the Openness of the Apache Arrow project.

Then could you also rename the pull request title in the following format?

GH-${GITHUB_ISSUE_ID}: [${COMPONENT}] ${SUMMARY}

or

MINOR: [${COMPONENT}] ${SUMMARY}

See also:

@robsdedude
Copy link
Author

Then could you also rename the pull request title in the following format?

I can in fact not... I think this classifies as a minor change, but I seem to lack permissions to rename my own PR... The button for is isn't showing. Must be a GH thing.

@AlenkaF AlenkaF changed the title Docs: Array.from_buffers accepts None buffers MINOR: [Python]Array.from_buffers accepts None buffers Feb 10, 2026
Copy link
Member

@AlenkaF AlenkaF left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this change is OK and would also update the DictionaryArray method docstrings. cc @raulcd what do you think?

Copy link
Member

@raulcd raulcd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes sense to me, even though this will probably be reworked as part of the adding type hints initiative that @rok is leading.
@rok does this look good to you?

@robsdedude
Copy link
Author

I think this change is OK and would also update the DictionaryArray method docstrings.

@AlenkaF would you prefer a separate PR or should I extend this one?

@AlenkaF
Copy link
Member

AlenkaF commented Feb 11, 2026

Please, extend this one.

@github-actions github-actions bot added awaiting committer review Awaiting committer review awaiting merge Awaiting merge and removed awaiting review Awaiting review awaiting committer review Awaiting committer review labels Feb 11, 2026
@robsdedude
Copy link
Author

Done. While at it, I also saw that RunEndEncodedArray might need updating?

@robsdedude robsdedude changed the title MINOR: [Python]Array.from_buffers accepts None buffers MINOR: [Python] Array.from_buffers accepts None buffers Feb 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants